import { getRequest } from '@/services';


const state = {
    liveList: [],
    total:0
}

const mutations = {
    updata(state, payload) {
        for (let key in payload) {
            state[key] = payload[key]
        }
    }
}

const actions = {
    async getRequest({ commit }, payload) {
        const {data} = await getRequest();
        commit('updata',{ liveList: data.room_info,total:data.total })
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions,
}